package com.xiaoyang.controller;

import com.xiaoyang.bean.City;
import com.xiaoyang.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lichenyang
 * @create 2021-07-15 09:42
 */
@RestController
public class CityController {

    @Autowired
    private CityService cityService;

    @RequestMapping("/getCity")
    public City getCity(@RequestParam Long id){
        return cityService.getById(id);
    }

}
